/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Jinan Tony Robotics Co., Ltd. All rights reserved.
 *  Author: Sun Liang
 *--------------------------------------------------------------------------------------------*/

/* --- Ros viewlet --- */
.ros-viewlet {
	height: 100%;
}

.ros-viewlet .explorer-item,
.ros-viewlet .open-editor,
.ros-viewlet .editor-group {
	height: 22px;
	line-height: 22px;
}

.ros-viewlet .explorer-item {
	display: flex; /* this helps showing the overflow ellipsis (...) even though we use display:inline-block for the labels */
	flex-wrap: nowrap;
}

.ros-viewlet .explorer-item > a,
.ros-viewlet .open-editor,
.ros-viewlet .editor-group {
	text-overflow: ellipsis;
	overflow: hidden;
}

.ros-viewlet .explorer-item,
.ros-viewlet .explorer-item .label-name,
.ros-viewlet .explorer-item .monaco-inputbox {
	flex: 1;
}

.ros-viewlet .explorer-item.explorer-item-edited .label-name {
	flex: 0; /* do not steal space when label is hidden because we are in edit mode */
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content {
	display: flex;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content > .monaco-action-bar {
	visibility: hidden;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row:hover > .content .monaco-action-bar,
.ros-viewlet .explorer-open-editors .monaco-tree.focused .monaco-tree-row.focused > .content .monaco-action-bar,
.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content.dirty > .monaco-action-bar {
	visibility: visible;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .action-label {
	display: block;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .close-editor-action {
	width: 8px;
	height: 22px;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .action-close-all-files,
.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content .monaco-action-bar .save-all {
	width: 23px;
	height: 22px;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content > .open-editor {
	flex: 1;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row > .content > .editor-group {
	flex: 1;
}

.ros-viewlet .monaco-count-badge {
	padding: 1px 6px;
	margin-left: 6px;
	border-radius: 0; /* goes better when ellipsis shows up on narrow sidebar */
}

.ros-viewlet .explorer-empty-view {
	padding: 0 20px 0 20px;
}

.ros-viewlet .explorer-item .monaco-inputbox {
	width: 100%;
	line-height: normal;
}

.monaco-workbench.linux .ros-viewlet .explorer-item .monaco-inputbox,
.monaco-workbench.mac .ros-viewlet .explorer-item .monaco-inputbox {
	height: 22px;
}

.ros-viewlet .explorer-item .monaco-inputbox.idle {
	border: 1px solid rgba(128, 128, 128, 0.5);
}

.ros-viewlet .explorer-item .monaco-inputbox > .wrapper > .input {
	padding: 1px 2px;
}

.monaco-workbench.linux .ros-viewlet .explorer-item .monaco-inputbox > .wrapper > .input,
.monaco-workbench.mac .ros-viewlet .explorer-item .monaco-inputbox > .wrapper > .input {
	padding: 0;
	height: 20px;
}

.ros-viewlet .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group {
	font-size: 11px;
	font-weight: bold;
	text-transform: uppercase;
	cursor: default;
}

/* Bold font style does not go well with CJK fonts */
.ros-viewlet:lang(zh-Hans) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group,
.ros-viewlet:lang(zh-Hant) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group,
.ros-viewlet:lang(ja) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group,
.ros-viewlet:lang(ko) .explorer-open-editors .monaco-tree .monaco-tree-row .editor-group { font-weight: normal; }

/* Disable tree twistie */
.ros-viewlet .explorer-open-editors > .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content:after,
.ros-viewlet .explorer-open-editors > .monaco-tree .monaco-tree-rows > .monaco-tree-row > .content:before {
	border: none;
}

/* High Contrast Theming */
.hc-black .monaco-workbench .ros-viewlet .explorer-item,
.hc-black .monaco-workbench .ros-viewlet .open-editor,
.hc-black .monaco-workbench .ros-viewlet .editor-group {
	line-height: 20px;
}

.hc-black .monaco-workbench .ros-viewlet .explorer-item .monaco-inputbox > .wrapper > .input:focus {
	outline-offset: -2px !important;
	outline: 1px solid #f38518 !important;
	padding-left: 2px; /* push text by the width of the outline offset to prevent overlaying */
}

.hc-black .monaco-workbench .ros-viewlet .explorer-item .monaco-inputbox.synthetic-focus {
	outline: none !important;
	border: none;
}